<?php
/**注意此文档为UTF-8的编码.
 * Created on 2010-9-23
 *
 * @author EXT <isrn@qq.com>
 *
 */
include ('../../includes/global.php');
include ('../global.php');
include ("../power.php");
/*Array
(
    [hexid] => 60ce077a45b67e6d
    [user] => ffffffff
    [psw] => ffffffff
    [oh] => ffffffff
    [ol] => ffffffff
    [orh] => ffffffff
    [orl] => ffffffff
    [wh] => ffffffff
    [wl] => ffffffff
    [ws] => ffffffff
    [rh] => ffffffff
    [rl] => ffffffff
    [rs] => ffffffff
    [newuser] => ffffffff
    [us] => ffffffff
    [newpsw] => ffffffff
    [ps] => ffffffff
    [jia1] => 123456
    [jia2] => 1283941965
    [js] => 0
    [jue1] => 654321
    [jue2] => 
    [jus] => 
)
*/
$ikeyw=array(
			 'hexid'=>$_POST['hexid'],
			 'rh'=>$_POST['orh'],
			 'rl'=>$_POST['orl'],
			 'wh'=>$_POST['oh'],
			 'wl'=>$_POST['ol']
			 );
$temp=Dgd(array(//SELECT name , sex FROM `_love` WHERE 1 and id < 1 limit 1;
		  'db'=>'d_sevenel',
		  'tn'=>"ikeyw",
		  //'column'=>" id, name , sex ",
		  'cd'=>"hexid like '".$ikeyw['hexid']."'",
		  'limit'=>1,
		  //'ce'=>1,
		  //'tp'=>'love',
		  //'rt'=>'serialize',
		  //'start'=>'5'
		  ));

if(!$temp){
	if( Di('sevenel','ikeyw',$ikeyw)){
		echo "入库成功！<BR>";	
		}else{
		echo "入库失败！<BR>";	
			}
	}else{
	echo $temp[id]."___".$temp['hexid']."已存在！<BR>";
	if( Du('sevenel','ikeyw',$ikeyw,'id',$temp[id])){
		echo "更新成功！<BR>";	
		}else{
		echo "更新失败！<BR>";	
			}
	}
$ikey=array(
			 'hexid'=>$_POST['hexid'],
			 'rh'=>$_POST['orh'],
			 'rl'=>$_POST['orl'],
			 'user'=>$_POST['user'],
			 'psw'=>$_POST['psw'],
			 'szqz'=>$_POST['jia2']
			 );
$temp=Dgd(array(//SELECT name , sex FROM `_love` WHERE 1 and id < 1 limit 1;
		  'db'=>'d_sevenel',
		  'tn'=>"ikey",
		  //'column'=>" id, name , sex ",
		  'cd'=>"hexid like '".$ikeyw['hexid']."'",
		  'limit'=>1,
		  //'ce'=>1,
		  //'tp'=>'love',
		  //'rt'=>'serialize',
		  //'start'=>'5'
		  ));
if(!$temp){
	if( Di('sevenel','ikey',$ikey)){
		echo "IKEY入库成功！<BR>";	
		}else{
		echo "IKEY入库失败！<BR>";	
			}
	}else{
	echo $temp[id]."___".$temp['hexid']."IKEY已存在！<BR>";
	if( Du('sevenel','ikey',$ikey,'id',$temp[id])){
		echo "IKEY更新成功！<BR>";	
		}else{
		echo "IKEY更新失败！<BR>";	
			}
	}
?>